<!-- 
	地址列表
 -->
<template>
	<view class="all-addr-list">
		<cu-custom :isBack="true" bgColor="bg-fa">
			<block slot="content">我的地址</block>
		</cu-custom>
		
		<view class="aadr-list" v-if="list.length>0">
			<view class="addr-item">
				<view class="left-text">
					<view class="name-subtring">
						{{'ling' | firstFont}}
					</view>
				</view>
				<view class="right-text">
					<view class="link-box">
						<view class="link-name">ling</view>
						<view class="lingk-phone">13712345678</view>
					</view>
					<view class="address">
						<text class="defa">默认</text>广西壮族自治区南宁市青秀区名族大道66号名族广场2楼2-1-1
					</view>
				</view>
				<view class="edit-box" @tap="navEdit('/pages/setting/addrFrom?type=1')">
					编辑
				</view>
			</view>
		</view>
		
		<view class="none-data" v-if="list.length == 0">
			<image class="img" src="~/static/mine/noneMsg.png"></image>
		</view>
		
		
		<view class="add-btn-box">
			<view class="add-btn"  @tap="navEdit('/pages/setting/addrFrom?type=0')">
				添加地址
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		name:"addrList",
		data(){
			return {
				list:[0],
			}
		},
		filters:{
			firstFont(val){
				return val.substring(0,1)
			}
		},
		methods:{
			navEdit(path){
				uni.navigateTo({
					url:path
				})
			}
		},
		onLoad() {
			
		}
	}
</script>

<style scoped lang="scss">
	.all-addr-list{
		width: 100%;
		.aadr-list{
			padding: 0 20rpx 160rpx 20rpx;
			.addr-item{
				background: #FFFFFF;
				border-radius: 10rpx 10rpx;
				padding: 20rpx 20rpx;
				margin-top: 40rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				.left-text{
					min-width: 130rpx;
					max-width: 130rpx;
					.name-subtring{
						display: inline-block;
						width: 100rpx;
						height: 100rpx;
						font-size: 50rpx;
						text-align: center;
						line-height: 100rpx;
						background: #bcbcbc;
						border-radius: 100rpx 100rpx;
						color: #FFFFFF;
					}
					
				}
				.link-box{
					display: flex;
					justify-content: space-between;
					align-items: flex-end;
					.link-name{
						font-size: 28rpx;
					}
					.lingk-phone{
						color: #888888;
					}
				}
				.address{
					color: #666666;
				}
				.defa{
					color: #FA436A;
					font-size: 24rpx;
					padding: 4rpx 8rpx;
					background: #f8c2ce;
					margin-right: 10rpx;
				}
				.edit-box{
					width: 100rpx;
					height: 60rpx;
					min-width: 100rpx;
					max-width: 100rpx;
					color: #888888;
					text-align: center;
					border-left: 2rpx solid #F1F1F1;
					line-height: 60rpx;
					margin-left: 20rpx;
				}
			}
		}
		.none-data{
			margin-top: 30%;
			text-align: center;
			.img{
				width: 50vw;
				height: 50vw;
			}
		}
		.add-btn-box{
			position: fixed;
			bottom: 0;
			left: 0;
			right: 0;
			width: 100%;
			height: 120rpx;
			.add-btn{
				width: 90%;
				margin-left: 5%;
				height: 92rpx;
				border-radius: 92rpx 92rpx;
				color: #FFFFFF;
				font-size: 32rpx;
				text-align: center;
				line-height: 92rpx;
				background: #FA436A;
			}
		}
	}
</style>
